package com.example.bianpan.nodes;

import com.alibaba.fastjson.JSON;
import com.example.bianpan.Node;
import com.example.bianpan.context.ReviewContext;
import org.springframework.stereotype.Component;

@Component
public  class ReviewNode_1 extends Node<ReviewContext> {

    @Override
    public  void  process(ReviewContext context)
    {
        double quantity = context.getQuantity();

        quantity = quantity / 1.5;
        context.setQuantity(quantity);
        System.out.println("第一次执行结果："+JSON.toJSONString(context));
    }

    @Override
    public  String getNodeName(){
        return "节点1";
    }
}
